import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

// uView
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

// 自定义组件
import ModalBox from '@/components/modal-box.vue'
import CustomPicker from '@/components/custom-picker.vue'
import CustomButton from '@/components/custom-button.vue'
import CustomCheckbox from '@/components/custom-checkbox.vue'
import CustomNavbar from '@/components/custom-navbar.vue'
import UserInfoModal from '@/components/user-info-modal.vue'
Vue.component('modal-box', ModalBox)
Vue.component('custom-picker', CustomPicker)
Vue.component('custom-button', CustomButton)
Vue.component('custom-checkbox', CustomCheckbox)
Vue.component('custom-navbar', CustomNavbar)
Vue.component('user-info-modal', UserInfoModal)

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif